import { viewsModule } from './modules/views';
import { appModule } from './modules/app';
import { permissionModule } from './modules/permission';

export interface IAppStore {
    viewsModule: ReturnType<typeof viewsModule>;
    appModule: ReturnType<typeof appModule>;
    permissionModule: ReturnType<typeof permissionModule>;
}

const appStore: IAppStore = {} as IAppStore;

export const registerStore = () => {
    appStore.viewsModule = viewsModule();
    appStore.appModule = appModule();
    appStore.permissionModule = permissionModule();
};

export default appStore;